<template>
  <div>
    <el-select style="width: 400px" v-model="value" placeholder="请选择">
      <el-option
        v-for="(item, index) in addressList"
        :key="index"
        :value="item.receiverName + '-' + item.receiverMobile + '-' + item.addr"
      >
        <span style="float: left">{{ item.receiverName }}</span>
        <span style="float: right; color: #8492a6; font-size: 13px">{{
          item.receiverMobile
        }}</span>
        <span>{{ item.addr }}</span>
      </el-option>
    </el-select>
  </div>
</template>

<script>
export default {
  name: "Adress.vue",
  data() {
    return {
      // addressList: [
      //   {
      //     addrId: "1",
      //     receiverName: "KK",
      //     receiverMobile: "13274027549",
      //     addr: "重庆市南岸区江南水岸二组团",
      //     isDefault: "1",
      //   },
      // ],
      //用户地址
      address: {
        addrId: "1",
        receiverName: "KK",
        receiverMobile: "13274027549",
        addr: "重庆市南岸区江南水岸二组团",
        isDefault: "1",
      },
      addressList: parent,
      value: "请选中地址",
    };
  },
  props: {
    parent: Array,
  },
  created() {
    console.log("地址：");
    console.log(this.addressList);
  },
};
</script>

<style scoped></style>
